package com.chen.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;
import java.util.Date;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author chen
 * @since 2022-12-13
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("tb_image")
@ApiModel(value = "Image对象", description = "")
public class Image extends Model<Image> {

    @ApiModelProperty("主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("图片路径")
    @TableField("path")
    private String path;

    @ApiModelProperty("图片大小")
    @TableField("size")
    private Long size;

    @ApiModelProperty("图片类型")
    @TableField("media_type")
    private String mediaType;

    @ApiModelProperty("图片后缀")
    @TableField("suffix")
    private String suffix;

    @ApiModelProperty("图片高度")
    @TableField("height")
    private Integer height;

    @ApiModelProperty("图片宽度")
    @TableField("width")
    private Integer width;

    @ApiModelProperty("创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;


    @Override
    public Serializable pkVal() {
        return this.id;
    }

}
